From 58b5ff296dda4e7b87ae7d9b1d8e41fff14121bf Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Mon, 24 Apr 2006 13:43:10 +0000 Subject: [PATCH] Fix handling of negative ordinates --- gpsbabel/an1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gpsbabel/an1.c b/gpsbabel/an1.c index 17d3418c0..05e980489 100644 --- a/gpsbabel/an1.c +++ b/gpsbabel/an1.c @@ -205,14 +205,14 @@ Skip(FILE * f, static double DecodeOrd( long ord ) { - return (double)(0x80000000-ord)/(0x800000); + return ((double)(long)(0x80000000L-ord))/(0x800000); } static long EncodeOrd( double ord ) { - unsigned long tmp = ord * 0x800000; - return 0x80000000UL-tmp; + long tmp = ord * 0x800000; + return 0x80000000L-tmp; } static int -- 2.30.2